const initialState: string[] = [];

export default function citysReducer(state = initialState, action: any) {
  switch (action.type) {
    case "ADD":
      return [...state, action.payload];

    // { payload: ['北京'] }
    case "SET":
      return [...action.payload];

    default:
      return state;
  }
}
